<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>添加公司信息</title>
    <link th:replace="common/header"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" action="add.do" name="form" th:action="@{/companyInfo/add}"
                              th:method="post" th:object="${companyInfo}">
                            <h3 class="header smaller lighter blue"><i class="fa fa-plus" aria-hidden="true"></i>添加公司信息
                            </h3>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="companyName">公司名称:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="companyName" id="companyName" class="input_fix"
                                                   placeholder="公司名称"
                                                   th:value="*{companyName}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="companyAddress">公司地址:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="companyAddress" id="companyAddress" class="input_fix"
                                                   placeholder="公司地址"
                                                   th:value="*{companyAddress}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('companyName')}"
                                                                  th:errors="*{companyName}">
                                        Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('companyAddress')}"
                                                                  th:errors="*{companyAddress}">Name
                                        Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="businessMan">法人:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="businessMan" id="businessMan" class="input_fix"
                                                   placeholder="法人"
                                                   th:value="*{businessMan}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="phone">联系电话:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="phone" id="phone" class="input_fix" placeholder="联系电话"
                                                   th:value="*{phone}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('businessMan')}"
                                                                  th:errors="*{businessMan}">
                                        Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('phone')}"
                                                                  th:errors="*{phone}">Name
                                        Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="type">公司类型:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{type}" id="type" name="type"
                                                    class="input_fix9" th:value="*{type}">
                                                <option value="">--请选择--</option>
                                                <option th:each="companyType : ${T(xyz.ibenben.zhongdian.system.entity.enums.CompanyTypeEnum).values()}"
                                                        th:value="${companyType}"
                                                        th:text="${companyType.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="registeredCapital">注册资本:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="registeredCapital" id="registeredCapital" class="input_fix"
                                                   placeholder="注册资本" th:value="*{registeredCapital}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('type')}"
                                                                  th:errors="*{type}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('registeredCapital')}"
                                                                  th:errors="*{registeredCapital}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="status">经营状态:<span style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{status}" id="status" name="status"
                                                    class="input_fix9" th:value="*{status}">
                                                <option value="">--请选择--</option>
                                                <option th:each="status : ${T(xyz.ibenben.zhongdian.system.entity.enums.CompanyStatusEnum).values()}"
                                                        th:value="${status}"
                                                        th:text="${status.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="email">电子邮箱:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="email" id="email" class="input_fix" placeholder="电子邮箱"
                                                   th:value="*{email}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('status')}"
                                                                  th:errors="*{status}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('email')}"
                                                                  th:errors="*{email}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="createDate">成立日期:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="createDate" id="createDate" class="input_fix7"
                                                   placeholder="成立日期"
                                                   th:value="*{createDate} == null ? '' : *{#dates.format(createDate, 'yyyy-MM-dd')}"/>
                                            <img onclick="WdatePicker({el:'createDate',dateFmt:'yyyy-MM-dd'})"
                                                 style="width:16px;height:22px" align="middle"
                                                 th:src="@{/js/My97DatePicker/skin/datePicker.gif}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="url">企业网址:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="url" id="url" class="input_fix" placeholder="企业网址"
                                                   th:value="*{url}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('createDate')}"
                                                                  th:errors="*{createDate}">Name Error</span></span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('url')}"
                                                                  th:errors="*{url}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span12">
                                    <div class="control-group">
                                        <label class="control-label" for="province">所在省-所在市-所在区/县/镇:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{province}" id="province" name="province"
                                                    class="input_fix3" th:value="*{province}"
                                                    th:onchange="'provinceChange(this.value, null, \'--请选择--\')'">
                                                <option value="">--请选择--</option>
                                                <option th:each="province : ${provinceList}"
                                                        th:value="${province.provinceCode}"
                                                        th:text="${province.provinceName}">山东
                                                </option>
                                            </select>-
                                            <select th:field="*{city}" id="city" name="city" class="input_fix3"
                                                    th:value="*{city}"
                                                    th:onchange="'cityChange(this.value, null, \'--请选择--\')'">
                                                <option value="">--请选择--</option>
                                                <option th:each="city : ${cityList}"
                                                        th:value="${city.cityCode}" th:text="${city.cityName}">青岛
                                                </option>
                                            </select>-
                                            <select th:field="*{region}" id="region" name="region" class="input_fix3"
                                                    th:value="*{region}">
                                                <option value="">--请选择--</option>
                                                <option th:each="region : ${regionList}"
                                                        th:value="${region.regionCode}" th:text="${region.regionName}">
                                                    市北
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                        <span style="color:red"><span th:if="${#fields.hasErrors('province')}"
                                                                      th:errors="*{province}">Name Error</span>
                                            <span th:if="${#fields.hasErrors('city')}"
                                                  th:errors="*{city}">Name Error</span>
                                            <span th:if="${#fields.hasErrors('region')}"
                                                  th:errors="*{region}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="companyCode">公司代码:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="companyCode" id="companyCode" class="input_fix"
                                                   placeholder="公司代码"
                                                   th:value="*{companyCode}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="companyNature">公司性质:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="companyNature" id="companyNature" class="input_fix"
                                                   placeholder="公司性质" th:value="*{companyNature}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('companyCode')}"
                                                                  th:errors="*{companyCode}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('companyNature')}"
                                                                  th:errors="*{companyNature}">Name
                                        Error</span>&nbsp;</span>
                                </div>
                            </div>

                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="staffNumber">员工数量:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="staffNumber" id="staffNumber" class="input_fix"
                                                   placeholder="员工数量" th:value="*{staffNumber}"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="scope">经营范围:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="scope" id="scope" class="input_fix" placeholder="经营范围"
                                                   th:value="*{scope}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('staffNumber')}"
                                                                  th:errors="*{staffNumber}">Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('scope')}"
                                                                  th:errors="*{scope}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                    <div class="control-group">
                                        <label class="control-label" for="nowAddress">现公司地址:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="nowAddress" id="nowAddress" class="input_fix"
                                                   placeholder="公司地址"
                                                   th:value="*{nowAddress}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('nowAddress')}"
                                                                  th:errors="*{nowAddress}">Name Error</span>&nbsp;</span>
                                </div>
                            </div>

                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button shiro:hasPermission="/companyInfo/add" class="btn btn-primary"
                                            type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>提交
                                    </button>
                                    <button shiro:hasPermission="/companyInfo/add" class="btn btn-danger" type="reset">
                                        <i class="fa fa-times" aria-hidden="true"></i>取消
                                    </button>
                                    <a shiro:hasPermission="/companyInfo/getAll" class="btn" href="getAll"
                                       th:href="@{/companyInfo/getAll}"><i class="fa fa-reply" aria-hidden="true"></i>返回</a>
                                </div>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>

<script type="text/javascript">
    $("form").submit(function () {
        $(":submit", this).attr("disabled", "disabled");
    });
</script>
</body>
</html>
